﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Module_BarItem_Get_WithNullRecord')
	BEGIN
		DROP  Procedure  Module_BarItem_Get_WithNullRecord
	END

GO

CREATE Procedure Module_BarItem_Get_WithNullRecord
AS

	SELECT 
		'00000000-0000-0000-0000-000000000000' AS BarItemGuid, 
		'<Root Item>' AS BarItemName 
		
	UNION 
	
	SELECT 
		MBI.BarItemGuid, 
		MR.RibbonName + ' - ' + MRB.RibbonBarName + ' - ' + MBI.BarItemName AS BarItemName 
		
	FROM Module_BarItem MBI 
		INNER JOIN Module_RibbonBar MRB ON MRB.RibbonBarGuid = MBI.RibbonBarGuid 
		INNER JOIN Module_Ribbon MR ON MR.RibbonGuid = MRB.RibbonGuid 
		
GO


